#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
    int a, b;
    while (scanf("%d %d", &a, &b) != EOF)
    {
        int i = 0;
        int count = 0;
        int c = a ^ b;
        for (i = 0; i < 32; i++)
        {
            if (((c >> i) & 1) == 1)
                count++;
        }
        printf("%d", count);
    }
    return 0;

}
   